package com.ojoin.trade.supplyloan_core.web.dao;

import java.util.List;

import org.springframework.data.domain.Pageable;

import com.ojoin.trade.common.web.dao.BaseDao;
import com.ojoin.trade.supplyloan_core.web.domain.TbSlSupplyInventory;

public interface TbSlSupplyInventoryDao extends BaseDao<TbSlSupplyInventory> {

	/**
	 * 按平台用户删除历史数据
	 */
	int deleteByPlatformAccountId(Integer platformAccountId,String rowCreateTime);

	void deleteRepeat(int platformAccountId);
	
	List<TbSlSupplyInventory> queryByStoreDate(int platformAccountId,String storeDateStart, String storeDateEnd, String itemStatus,Pageable page);

	List<TbSlSupplyInventory> queryByRowCreateTime(int platformAccountId, String rowCreateTimeStart,String rowCreateTimeEnd, String itemStatus,Pageable page);
	
	List<TbSlSupplyInventory> query(int platformAccountId, String rowCreateTimeStart,String rowCreateTimeEnd, String storeDateStart, String storeDateEnd,String itemStatus,Pageable page);
	

	public long queryInventoryMoneyByStoreDate(int platformAccountId,String storeDateStart, String storeDateEnd, String itemStatus);
	
	public long queryInventoryMoneyByRowCreateTime(int platformAccountId, String rowCreateTimeStart,String rowCreateTimeEnd,String itemStatus);
	
	public long queryInventoryMoney(int platformAccountId,String storeDateStart, String storeDateEnd, String rowCreateTimeStart,String rowCreateTimeEnd,String itemStatus);
	
	String getLastInsertTime(int platformAccountId) ;
	
	String getLastStoreDate(int platformAccountId,String itemStatus) ;
	
	String getLastStoreDate(int platformAccountId) ;
}
